package dk.ahp.galgelegapp;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class WordList extends Activity {
	private ListView listview;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.word_list);
        listview = (ListView) findViewById(R.id.listView1);
         
        if (null != GalgeApplication.getGalgeLogik().muligeOrd){
        	listview.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, 
        			android.R.id.text1, GalgeApplication.getGalgeLogik().muligeOrd));
        }
        else {
	        String[] tmp = { "Testliste", "muligeord", "fra", "galgelogik", "er", "null", ".", "Så her", "er", "test listen." };
	        listview.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, android.R.id.text1, tmp));
        }
    }
}
